package com.yunfangdata.web.controller;

import com.yunfangdata.query.QueryObject;
import com.yunfangdata.service.IStaffNeedsService;
import com.yunfangdata.util.PageResult;
import com.yunfangdata.util.PermissionName;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("staffneeds")
public class StaffNeedsController {


    @Autowired
    private IStaffNeedsService staffNeedsService;

    @RequiresPermissions("staffneeds:index")
    @PermissionName("用人需求首页")
    @RequestMapping("")
    public String index(){
        return "staffneeds/list";
    }

    @RequiresPermissions("staffneeds:list")
    @PermissionName("用人需求列表")
    @RequestMapping("list")
    @ResponseBody
    public PageResult list(QueryObject qo){
        return staffNeedsService.queryAllitems(qo);
    }


    
}
